{% extends "forum_basictemplate.html" %}
{% load i18n markup %}
{% block title %}{{ thread.title|escape }} ({{ forum.title }}){% endblock %}

{% block pagetitle %}{{ forum.title }} &raquo; {{ thread.title|escape }}{% endblock %}


{% block breadcrumbs %}{% for title, url in thread.forum.get_url_name %} &raquo; <a href='{{ url }}'>{{ title }}</a>{% endfor %} &raquo; <a href='{{ thread.get_absolute_url }}'>{{ thread.title|escape }}</a> ({{ thread.posts }} post{{ thread.posts|pluralize }}){% endblock %}

{% block content %}

<table id='djangoForumThreadPosts'>
{% for post in post_list %}

<tr>
<th class='djangoForumThreadPostDetail' id='post{{ post.id }}'>{{ post.time|timesince }} ago<br />
by <font color = #000>{{ post.author }}</font></h5>
<td>{{ post.body|force_escape|markdown|safe }}</td>
</tr>{% endfor %}

</table>

{% if is_paginated %}
<ul>
  <li class="djangoForumPagination"><a href="?page=1">{% trans "First" %}</a></li>
{% for page_number in paginator.page_range %}
  <li class="djangoForumPagination"><a href="?page={{ page_number }}">{{ page_number }}</a></li>  
{% endfor %}
  <li class="djangoForumPagination"><a href="?page={{ paginator.num_pages }}">{% trans "Last" %}</a></li>  
</ul>
{% endif %}

<!--{% if request.user.is_authenticated %}<p><a href="{% url forum_subscriptions %}">{% trans "Update Subscriptions" %}</a></p>{% endif %}-->
<br><h3>Post a Reply</h3>
{% if thread.closed %}
<p>Sorry, this thread is closed. No further replies are permitted.</p>
{% else %}
{% if user.is_authenticated %}
<form method='post' action='reply/'>
<h5><label>Posting As </label><font color = "#f80">{{ user.username }}</font></h5>
{{ form.as_p }}
<p><input type='submit' value='Submit' /></p>
</form>
{% else %}
<h5>Please <a href = "/kgp/account/signin/complete/">login</a> to post a reply.</h5>
{% endif %}
{% endif %}

{% endblock %}
